package org.dromara.demo2.dubbo;

import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.demo2.api.RemoteDemo2TestUserService;
import org.dromara.demo2.api.domain.bo.RemoteTestUserBo;
import org.dromara.demo2.domain.TestUser;
import org.dromara.demo2.domain.bo.TestUserBo;
import org.dromara.demo2.service.ITestUserService;
import org.springframework.stereotype.Service;

/**
 * @author: gxp
 * @desc: todo
 * @create: 2024-09-28 21:51
 **/
@RequiredArgsConstructor
@Service
@DubboService
public class RemoteTestUserServiceImpl implements RemoteDemo2TestUserService {

    private final ITestUserService testUserService;
    @Override
    public void saveTestUser(RemoteTestUserBo bo) {
           TestUserBo add = MapstructUtils.convert(bo, TestUserBo.class);
           testUserService.insertByBo(add);
    }
}
